﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace winDim
{
    public partial class dimWindow : Form
    {

        /*888888888888888888888888888888888888888888888888888
         * 88  I hate comenting code, but since im putting this on codeplex i figure i should.
         * 88  Hi. Im WillWharton.com and I wrote this.
         * 88  Q?A: dubayou@gmail.com Updates: http://codeplex.com/winDim
         * 88  ===============================================
         * 88
         * 88  This is the actual dimWindow Form.  I have a few variations the im not relesing. Email me
         * 88  Can be used in a Widget like system. he he.
         * 88
         *888888888888888888888888888888888888888888888888888*/

        public dimWindow()
        {
            InitializeComponent();
            this.Opacity = 0.95;                   
            this.Bounds = Screen.PrimaryScreen.Bounds;
            
        }

        private void trackBar1_Scroll(object sender, EventArgs e)
        {
            this.Opacity = trackBar1.Value / 100.0f;    //funky numbers
            timer1.Enabled = true;
        }

        public void whiteit(Point a, Point b)
        {
            panel1.SetBounds(a.X, a.Y, b.X - a.X, b.Y - a.Y);   //cut it out
        }

        private void dimWindow_Load(object sender, EventArgs e)
        {

        }

        private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
        {

        }

        private void dimWindow_DoubleClick(object sender, EventArgs e)
        {
            this.Hide();  //idk
        }

        private void timer1_Tick(object sender, EventArgs e)
        {
            trackBar1.Visible = false; //shh.
            timer1.Enabled = false;
        }
    }
}
